﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Microsoft.Xna.Framework;
using System.Text;

namespace Dune2k1
{
    public class TileSet
    {
        #region Variables
        List<R16> tiles;
        string name;
        #endregion

        #region Properties
        public ReadOnlyCollection<R16> Tiles
        {
            get { return tiles.AsReadOnly(); }
        }

        public string Name
        {
            get { return name; }
        }
        #endregion

        public TileSet(string name)
        {
            this.name = name;

            tiles = new List<R16>();
        }

        public void LoadTileSet(string filepath)
        {
            R16Parser p = new R16Parser(filepath);
            R16 t;
            while ((t = p.ReadNextBlock()) != null)
            {
                tiles.Add(t);
            }
        }
    }
}
